package com.example.pojo.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.Id;
import jakarta.persistence.criteria.CriteriaBuilder;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 所学内容:聊天记录表
 *
 * @author ..
 * @Date 2023/10/26 19:14
 */
@Document(collection = "chat_records")
@Data
public class ChatRecords {
    @Id
    private String id;

    //聊天表id
    private Integer chatId;

    //判断是否发送标识
    //0为求职者发送给招聘者
    //1为招聘者发送给求职者
    private Integer sign;

    //聊天信息
    //指具体的聊天文本
    private String message;

    //发送时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    //附件的路径
    private String accessory;
}
